package org.duiduo.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 接口响应常量类
 *
 * @author 夜泷noga
 */
public class ResponseConstants {

    private ResponseConstants() {
        throw new AssertionError();
    }

    /**
     * @Fields SUCCESS : 请求接口成功
     */
    public static final boolean SUCCESS = true;

    /**
     * @Fields FAIL : 请求接口失败
     */
    public static final boolean FAIL = false;

    /**
     * 响应
     */
    @Getter
    @AllArgsConstructor
    public static enum Resp {

        //请求应答码
        REQ_00("00", "请求成功"),
        REQ_01("01", "请求失败"),
        REQ_02("02", "sign error"),
        REQ_A1("A1", "请求参数异常"),
        REQ_98("98", "请求异常"),

        //响应应答码
        RESP_00("00", "响应成功"),
        RESP_01("01", "数据请求异常"),
        RESP_02("02", "保存失败");

        /**
         * @Fields code : 响应代码
         */
        private String code;

        /**
         * @Fields message : 响应消息
         */
        private String message;
    }

}
